NetCore 常用命令

No. 基本命令 描述
1 new Creates a new project, configuration file, or solution based on the specified template
2 restore Restores the dependencies and tools of a project.
3 build Builds a project and all of its dependencies.
4 Run Runs source code without any explicit compile or launch commands.
5 publish Packs the application and its dependencies into a folder for deployment to a hosting system.
6 test Executes unit tests.
7 test Runs tests from the specified files.
8 pack Packs the code into a NuGet package.
9 clean Cleans the output of a project.
10 sln Modifies a .NET Core solution file
11 help Display help on the specified command
12 store Stores the specified assemblies in the runtime package store.
No. 项目修改命令 描述
1 add package Adds a package reference to a project.
2 add reference Adds project-to-project (P2P) references.
3 remove package Removes package reference from the project.
4 remove reference Removes project reference
5 list reference Lists all project-to-project references
No. 高级命令 描述
1 nuget delete Deletes or unlists a package from the server.
2 nuget locals Clears or lists local NuGet resources.
3 nuget push Pushes a package to the server and publishes it.
4 msbuild Builds a project and all of its dependencies.
5 dotnet install script Script used to install the .NET Core CLI tools and the shared runtime.